package com.imooc.sellspringcloud.server.service.impl;


import com.imooc.sellspringcloud.server.dataobject.ProductCategory;
import com.imooc.sellspringcloud.server.repository.ProductCategoryRepository;
import com.imooc.sellspringcloud.server.service.ProductCategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author
 * @create 2019-07-27 17:59
 **/
@Service
public class ProductCategoryServiceImpl implements ProductCategoryService {

    @Autowired
    private ProductCategoryRepository productCategoryRepository;

    @Override
    public List<ProductCategory> getProductCategoryByType(List<Integer> types) {

        List<ProductCategory> productCategories = productCategoryRepository
                .findByCategoryTypeIsIn(types);

        return productCategories;
    }
}